package com.github.pig.admin.job;

import com.github.pig.training.service.ITrainingStudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CheckDayJob  {

    @Autowired
    ITrainingStudentService studentService;


    /**
     *   每天凌晨0点10分执行检查是否有超最大跟进天数
     */
    @Scheduled(cron = "0 30 0 * * ?")
    public void execute() {
        studentService.checkDayNum();
        log.info("定时任务执行了~~~");
    }
}
